﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ctlSurfaceList.ascx.cs" Inherits="Ctl_ctlSurfaceList" %>


<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<%@ Register src="ctlFilterBar.ascx" tagname="ctlFilterBar" tagprefix="uc2" %>

<%@ Register src="ctlFilterSave.ascx" tagname="ctlFilterSave" tagprefix="uc3" %>

<%@ Register src="ctlFilterList.ascx" tagname="ctlFilterList" tagprefix="uc4" %>




<table style="width: 100%;background-color :rgb(240, 240, 240); height: 57px;"  cellpadding ="2" cellspacing ="0" >
    <tr>
        <td width="300px" colspan="2" >
                <uc2:ctlFilterBar ID="ctlFilterBar1" runat="server" />
        </td>
            
            
        <td style ="width:40px;font-size :xx-small">
            Период:</td>        
        <td style ="width:40px" >
            <asp:TextBox ID=txtStart CssClass="TextBox" Text =<%#GetTextStartPeriod() %> runat="server"></asp:TextBox>
        </td>
        <td style ="width:5px" >
            <asp:Button ID=Button1 runat="server" Text="+" CssClass ="btn_wizard" />
            </td>         
           <td style ="width:40px" >
               <asp:DropDownList ID="cmbAddPeriod" runat="server">
                   <asp:ListItem Value="1"></asp:ListItem>
                   <asp:ListItem Value="2"></asp:ListItem>
                   <asp:ListItem Value="3"></asp:ListItem>
                   <asp:ListItem Value="4"></asp:ListItem>
                   <asp:ListItem Value="5"></asp:ListItem>
                   <asp:ListItem Value="6"></asp:ListItem>
                   <asp:ListItem Value="7"></asp:ListItem>
                   <asp:ListItem Value="8"></asp:ListItem>
                   <asp:ListItem Value="9"></asp:ListItem>
                   <asp:ListItem Value="10"></asp:ListItem>
               </asp:DropDownList>
        </td>
        
        <td style ="width:15px" >
            &nbsp;</td>  
        <td style ="width:35px" >
            <asp:DropDownList ID="cmbTermCount"  runat="server" 
                 >
                        <asp:ListItem Value="0">Месяц(а)</asp:ListItem>
                        <asp:ListItem Value="1">Недели</asp:ListItem>
                        <asp:ListItem Value="2">Деней</asp:ListItem>
                    </asp:DropDownList>
        </td>  
    </tr>   
    <tr style="height :15px">
        <td width="300px"  style ="font-size :xx-small; vertical-align:top">
                <asp:CheckBox ID="chShowOnlySelected"  Checked =<%# ShowOnlyFilterRows  %> runat="server"  Text="Только выбранные" />
            </td>
            
        <td >
                &nbsp;</td>
            
        <td style ="width:40px">
            &nbsp;</td>        
        <td colspan="5"  style ="font-size :xx-small">
        <asp:CheckBoxList  ID="CheckBoxList1" runat="server" 
                    RepeatDirection="Horizontal" Width="305px" Font-Size="XX-Small">
                    <asp:ListItem>Свободно</asp:ListItem>
                    <asp:ListItem>Занято</asp:ListItem>
                    <asp:ListItem>Усл. занято</asp:ListItem>
                </asp:CheckBoxList>        
            </td>
    </tr>   
</table>

<asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" style="display:none">
                    <div style="margin:10px">                                        
                     <uc4:ctlFilterList ID="ctlFilterList1" runat="server" />
                    </div>
</asp:Panel>

<asp:Panel ID="Panel2" runat="server" CssClass="modalPopup" style="display:none">
                    <div style="margin:10px">                                        
                     <uc3:ctlFilterSave  ID="ctlFilterSave1" runat="server" />
                    </div>
</asp:Panel>
    
    
<cc1:ModalPopupExtender ID="ModalPopupext_FilterSave" runat="server"
                    TargetControlID=<%# GetTargetControlID_FilterSave() %>
                    PopupControlID="FilterSave_Panel"
                    PopupDragHandleControlID="FilterSave_Panel"
                    BackgroundCssClass="modalBackground"
                    DropShadow="false"
                    OkControlID=<%# GetOkControlID_FilterSave() %>
                    CancelControlID=<%# GetCancelControlID_FilterSave() %>
                    X ="3"
                    Y="30" />

<cc1:ModalPopupExtender ID="ModalPopupext_FilterList" runat="server"
                    TargetControlID="ProxyOpen_FilterList"
                    PopupControlID="FilterList_Panel"
                    PopupDragHandleControlID="FilterList_Panel"
                    BackgroundCssClass="modalBackground"
                    DropShadow="false"
                    OkControlID=<%# GetOkControlID_FilterList() %>
                    CancelControlID=<%# GetCancelControlID_FilterList() %>
                    X ="3" 
                    Y="30" />



<asp:Panel runat ="server"  Width="100%" ID="pnlHeader" >
              <table cellpadding="0" cellspacing="0" width="100%">                        
                        <tr style ="vertical-align :middle" >     
                            <td style="width :17px" class ="grd_td_head">
                            <div  style ="width:100%; height :25px;" >
                                &nbsp
                             </div> 
                            </td>
                            <td style="width :23px" class ="grd_td_head">                                                                         
                               &nbsp
                            </td>                                                
                            <td style="width :22px; text-align :left " class ="grd_td_head">
                               <asp:LinkButton ID=LinkButton5 runat="server" OnClick ="lvSort" CommandArgument ="Litera" >A</asp:LinkButton>
                               <asp:Label ID=Label6 runat="server"  CssClass =<%# GetHeadCss("Litera") %>    Text="&nbsp&nbsp&nbsp"></asp:Label>                
                            </td>
                            <td style="width :100px" class ="grd_td_head">                                         
                                <asp:LinkButton ID=LinkButton4 runat="server" OnClick ="lvSort" CommandArgument ="FullGID" >GID</asp:LinkButton>
                               <asp:Label ID=Label5 runat="server"  CssClass =<%# GetHeadCss("FullGID") %>    Text="&nbsp&nbsp&nbsp"></asp:Label>                
                            </td>
                            <td style="width:15%" class ="grd_td_head">                                                        
                                  <asp:LinkButton ID=LinkButton6 runat="server" OnClick ="lvSort" CommandArgument ="ConstractionTypeName" >Носитель</asp:LinkButton>
                                  <asp:Label ID=Label7 runat="server"  CssClass =<%# GetHeadCss("ConstractionTypeName") %>    Text="&nbsp&nbsp&nbsp"></asp:Label>                
                            </td>
                            <td style="text-align :left;width :5px " class ="grd_td_head">
                                &nbsp;
                            </td>
                            <td style="width:15%" class ="grd_td_head">
                                    <asp:LinkButton ID=LinkButton7 runat="server" OnClick ="lvSort" CommandArgument ="FullAdress" >Адрес</asp:LinkButton>
                                  <asp:Label ID=Label8 runat="server"  CssClass =<%# GetHeadCss("FullAdress") %>    Text="&nbsp&nbsp&nbsp"></asp:Label>                
                            </td>
                            <td style ="width :15px" class ="grd_td_head">
                            </td>                                               
                            <td style="width :80px; text-align :left   " class ="grd_td_head">
                                    <asp:LinkButton ID=LinkButton8 runat="server" OnClick ="lvSort" CommandArgument ="CurrentPrice" >Цена</asp:LinkButton>
                                    <asp:Label ID=Label9 runat="server"  CssClass =<%# GetHeadCss("CurrentPrice") %>    Text="&nbsp&nbsp&nbsp"></asp:Label>                
                            </td>                            
                            <td style="width:30%;font-size :xx-small" class ="grd_td_head">                                

                                  
                            </td>
                        </tr>
                    </table>                 
</asp:Panel> 



<table width ="100%" cellspacing ="0" cellpadding="2" >
    <asp:ListView ID="lvSides" runat="server" 
        onpagepropertieschanged="lvSides_PagePropertiesChanged" 
        onselectedindexchanged="lvSides_SelectedIndexChanged" >
         <LayoutTemplate>                        
            <tr ID="itemPlaceholder" runat="server">
            </tr>
        </LayoutTemplate>        
         <ItemTemplate>          
            <tr ID="Tr1" runat="server" >                            
                <td     class ="grd_td_item" onmouseout="GrdItemOnMouseOut(this);" onmouseover="GrdItemOnMouseOver(this);">                
                    <table  cellspacing="0" width="100%">
                        <tr  >     
                            <td style="width :17px">
                                <asp:CheckBox ID="chSelected" Enabled =<%# IsSelectedRecord((string) Eval("ID")) %> Checked =<%# IsSelectedRecord((string) Eval("ID")) %> OnCheckedChanged="chSel_CheckedChanged"  CssClass=<%# (string) Eval("ID") %>  runat="server"   />
                            </td>
                            <td style="width :17px">                                                                         
                               <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/lamp.png" Visible='<%# Eval("Light") %>' />                                                     
                            </td>                                                
                            <td style="width :22px; text-align :left ">
                                    <%# Eval("Litera")%>
                            </td>
                            <td style="width :100px">                                         
                                <%# (string)Eval("GID")%>                                  
                            </td>
                            <td style="width:15%">                                                        
                                    <%# (string)Eval("ConstractionTypeName")%>
                            </td>
                            <td style="text-align :left;width :5px ">
                                &nbsp;
                            </td>
                            <td style="width:15%" >
                                    <%# (string)Eval("FullAdress")%>
                            </td>
                            <td style ="width :15px">
                            </td>                                               
                            <td style="width :80px; text-align :left ">
                                    <%# Convert.ToString(Eval("CurrentPrice"))%>               
                            </td>                            
                            <td style="width:30%;font-size :xx-small" >                                
                               
                            </td>
                        </tr>
                    </table>                
                </td>
            </tr>            
        </ItemTemplate>
</asp:ListView>
</table>


<asp:DataPager ID="DataPager" runat="server" EnableViewState="true" 
    PagedControlID="lvSides" PageSize=15 >
    <Fields>
        <asp:NumericPagerField ButtonCount="5" ButtonType="Link" NextPageText="--&gt;" 
            PreviousPageText="&lt;--" />
        <asp:NextPreviousPagerField ButtonType="Link" ShowFirstPageButton="true" 
            ShowLastPageButton="true" ShowNextPageButton="true" 
            ShowPreviousPageButton="true" />
    </Fields>
</asp:DataPager>

<asp:HiddenField ID="hfShowShedule" runat="server" Value="1" />
<asp:HiddenField ID="hfSheduleRowCommand" runat="server" />
<asp:HiddenField ID="HiddenField1" runat="server" Value="1" />
<asp:HiddenField ID="hfSideLstState" runat="server" Value="1" />
<asp:LinkButton ID=ProxyOpen_FilterList runat="server"></asp:LinkButton>

<cc1:CalendarExtender ID="txtStart_CalendarExtender" runat="server" Format="dd.MM.yyyy" Enabled="True" TargetControlID="txtStart">
</cc1:CalendarExtender>




